//
//  AboutTuYouVC.m
//  TuYouAPP
//
//  Created by L on 14-2-28.
//
//

#import "AboutTuYouVC.h"
#import "DataModel.h"
@interface AboutTuYouVC ()

@end

@implementation AboutTuYouVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    self.mPageName = @"关于途友";
    [super viewDidLoad];
    self.Title  =@"关于途友";
    self.LeftBarTitle = @"我的";
    // Do any additional setup after loading the view from its nib.
    if (!DeviceIsiPhone5()) {
        self.contentScrollView.contentSize = CGSizeMake(320, 500);

    }
}
- (IBAction)checked:(id)sender {
    [TYVersion getNewVersion:^(BOOL have, NSString *url, NSString *versionNum,NSString *desc, NSString *error) {
        if (error) {
            [SVProgressHUD showErrorWithStatus:@"检测失败"];
            return ;
        }
        if (have&&![versionNum isEqualToString:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]]) {
            UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"系统更新" message:desc delegate:self cancelButtonTitle:@"下次提醒" otherButtonTitles:@"立即更新", nil];
            [alertView show];
            
        }
        else
        {
            [SVProgressHUD showErrorWithStatus:@"没有检测到新版本"];
        }
    }];
}
-(void)leftBtnTouched:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
